﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ControlAccessUser.Presenter;

namespace ControlAccessUser.Tests
{
    public class MockSearchUserView : ISearchUserView
    {
        #region Propiedades
        public int UserIdSearch
        {
            get;
            set;
        }

        public string UserFirstNameSearch
        {
            get;
            set;
        }

        public string UserLastNameSearch
        {
            get;
            set;
        }

        public string UserNameSearch
        {
            get;
            set;
        }

        public ICollection<Model.User> UsersFound
        {
            get;
            set;
        }


        public Model.User DataSelectedUser
        {
            get;
            set;
        }

        public void GoUserSelected(Model.User User)
        {
            throw new NotImplementedException();
        }

        public bool UserReallyGoOut
        {
            get;
            set;
        }

        public Model.User UserLogged
        {
            get;
            set;
        }

        public string ErrorMessage
        {
            get;
            set;            
        }

        public string SystemMessage
        {
            get;
            set;
        }

        #endregion


        public void SetFieldFirstName()
        {
            UserIdSearch = -1;
            UserFirstNameSearch = "Gary";
            UserLastNameSearch = "";
            UserNameSearch = "";            
        }

        public void SetFieldLastName()
        {
            UserIdSearch = -1;
            UserFirstNameSearch = "";
            UserLastNameSearch = "To";
            UserNameSearch = "";
        }

        public void SetFieldUserName()
        {
            UserIdSearch = -1; 
            UserFirstNameSearch = "";
            UserLastNameSearch = "";
            UserNameSearch = "ga";
           
        }

        public void SetFieldUserId(int UserId)
        {
            UserIdSearch = UserId;
            UserFirstNameSearch = "";
            UserLastNameSearch = "";
            UserNameSearch = "";
        }

        public void SetFieldFirstNameAndLastName()
        {
            UserFirstNameSearch = "gar";
            UserLastNameSearch = "R";
            UserIdSearch = -1;
            UserNameSearch = "";            
        }

        public void SetSelectedUserToLogoutByManager(Model.User User, Model.User Manager)
        {
            UserLogged = Manager;
            DataSelectedUser = User;
            UserReallyGoOut = true;
        }

        public void SetSelectedUserToLogoutByManagerCancel(Model.User User, Model.User Manager)
        {
            UserLogged = Manager;
            DataSelectedUser = User;
            UserReallyGoOut = false;
        }
        
    }
}
